﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace AtletIS.Shared.WpfControls
{
       
    /// <summary>
    /// Interaction logic for CompetitionBox.xaml
    /// </summary>
    public partial class CompetitionBox : UserControl
    {
        public string title1 = string.Empty;
        public string title2 = string.Empty;
        
        public CompetitionBox()
        {
            InitializeComponent();
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            this.txtTitle.Text = title1;
            this.txtDetail.Text = title2;

            string sFilePath = AppDomain.CurrentDomain.BaseDirectory;
            sFilePath = System.IO.Path.Combine(sFilePath, "Ext", "logo100.png");
            if (System.IO.File.Exists(sFilePath))
            {
                BitmapImage flag = new BitmapImage();
                flag.BeginInit();
                flag.UriSource = new Uri(sFilePath);
                flag.EndInit();
                iLogo.Source = flag;
            }
        }
    }
}
